import cn.fj.PetApp;
import cn.fj.data.domain.Dictionary;
import cn.fj.data.service.IDictionaryService;
import cn.fj.org.domain.Department;
import cn.fj.org.domain.Employee;
import cn.fj.org.sevice.IDepartmentService;
import cn.fj.org.sevice.IEmployeeService;
import lombok.AllArgsConstructor;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@SpringBootTest(classes = PetApp.class)
@RunWith(SpringRunner.class)
public class Dtest {
    @Autowired
    IDepartmentService IDepartmentService;
    @Autowired
    IEmployeeService IEmployeeService;
    @Autowired
    IDictionaryService dictionaryService;

    @Test
    public void test() {
        List<Department> all = IDepartmentService.findAll();
        all.forEach(System.out::println);
        System.out.println(all);

    }

    @Test
    public void test1() {
        List<Employee> all = IEmployeeService.findAll();
        all.forEach(System.out::println);
        System.out.println(all);

    }

    @Test
    public void test2() {
        List<Dictionary> dictionaries = dictionaryService.queryAll();
        dictionaries.forEach(System.out::println);
        System.out.println(dictionaries);

    }

}
